Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.

Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

MIN1(cons2(N, cons2(M, L))) -> LE2(N, M)
IFMIN2(true, cons2(N, cons2(M, L))) -> MIN1(cons2(N, L))
IFREPL4(false, N, M, cons2(K, L)) -> REPLACE3(N, M, L)
REPLACE3(N, M, cons2(K, L)) -> EQ2(N, K)
REPLACE3(N, M, cons2(K, L)) -> IFREPL4(eq2(N, K), N, M, cons2(K, L))
IFSELSORT2(false, cons2(N, L)) -> SELSORT1(replace3(min1(cons2(N, L)), N, L))
IFMIN2(false, cons2(N, cons2(M, L))) -> MIN1(cons2(M, L))
SELSORT1(cons2(N, L)) -> EQ2(N, min1(cons2(N, L)))
EQ2(s1(X), s1(Y)) -> EQ2(X, Y)
SELSORT1(cons2(N, L)) -> MIN1(cons2(N, L))
IFSELSORT2(false, cons2(N, L)) -> REPLACE3(min1(cons2(N, L)), N, L)
LE2(s1(X), s1(Y)) -> LE2(X, Y)
IFSELSORT2(true, cons2(N, L)) -> SELSORT1(L)
MIN1(cons2(N, cons2(M, L))) -> IFMIN2(le2(N, M), cons2(N, cons2(M, L)))
IFSELSORT2(false, cons2(N, L)) -> MIN1(cons2(N, L))
SELSORT1(cons2(N, L)) -> IFSELSORT2(eq2(N, min1(cons2(N, L))), cons2(N, L))

The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MIN1(cons2(N, cons2(M, L))) -> LE2(N, M)
IFMIN2(true, cons2(N, cons2(M, L))) -> MIN1(cons2(N, L))
IFREPL4(false, N, M, cons2(K, L)) -> REPLACE3(N, M, L)
REPLACE3(N, M, cons2(K, L)) -> EQ2(N, K)
REPLACE3(N, M, cons2(K, L)) -> IFREPL4(eq2(N, K), N, M, cons2(K, L))
IFSELSORT2(false, cons2(N, L)) -> SELSORT1(replace3(min1(cons2(N, L)), N, L))
IFMIN2(false, cons2(N, cons2(M, L))) -> MIN1(cons2(M, L))
SELSORT1(cons2(N, L)) -> EQ2(N, min1(cons2(N, L)))
EQ2(s1(X), s1(Y)) -> EQ2(X, Y)
SELSORT1(cons2(N, L)) -> MIN1(cons2(N, L))
IFSELSORT2(false, cons2(N, L)) -> REPLACE3(min1(cons2(N, L)), N, L)
LE2(s1(X), s1(Y)) -> LE2(X, Y)
IFSELSORT2(true, cons2(N, L)) -> SELSORT1(L)
MIN1(cons2(N, cons2(M, L))) -> IFMIN2(le2(N, M), cons2(N, cons2(M, L)))
IFSELSORT2(false, cons2(N, L)) -> MIN1(cons2(N, L))
SELSORT1(cons2(N, L)) -> IFSELSORT2(eq2(N, min1(cons2(N, L))), cons2(N, L))

The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 5 SCCs with 6 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LE2(s1(X), s1(Y)) -> LE2(X, Y)

The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


LE2(s1(X), s1(Y)) -> LE2(X, Y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial Order [17,21] with Interpretation:

POL( LE2(x1, x2) ) = max{0, x2 - 2}


POL( s1(x1) ) = x1 + 3



The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

IFMIN2(false, cons2(N, cons2(M, L))) -> MIN1(cons2(M, L))
IFMIN2(true, cons2(N, cons2(M, L))) -> MIN1(cons2(N, L))
MIN1(cons2(N, cons2(M, L))) -> IFMIN2(le2(N, M), cons2(N, cons2(M, L)))

The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


IFMIN2(false, cons2(N, cons2(M, L))) -> MIN1(cons2(M, L))
IFMIN2(true, cons2(N, cons2(M, L))) -> MIN1(cons2(N, L))
The remaining pairs can at least be oriented weakly.

MIN1(cons2(N, cons2(M, L))) -> IFMIN2(le2(N, M), cons2(N, cons2(M, L)))
Used ordering: Polynomial Order [17,21] with Interpretation:

POL( IFMIN2(x1, x2) ) = max{0, x2 - 3}


POL( cons2(x1, x2) ) = x2 + 2


POL( MIN1(x1) ) = max{0, x1 - 3}



The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MIN1(cons2(N, cons2(M, L))) -> IFMIN2(le2(N, M), cons2(N, cons2(M, L)))

The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 0 SCCs with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQ2(s1(X), s1(Y)) -> EQ2(X, Y)

The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


EQ2(s1(X), s1(Y)) -> EQ2(X, Y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial Order [17,21] with Interpretation:

POL( EQ2(x1, x2) ) = max{0, x2 - 2}


POL( s1(x1) ) = x1 + 3



The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

IFREPL4(false, N, M, cons2(K, L)) -> REPLACE3(N, M, L)
REPLACE3(N, M, cons2(K, L)) -> IFREPL4(eq2(N, K), N, M, cons2(K, L))

The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


IFREPL4(false, N, M, cons2(K, L)) -> REPLACE3(N, M, L)
The remaining pairs can at least be oriented weakly.

REPLACE3(N, M, cons2(K, L)) -> IFREPL4(eq2(N, K), N, M, cons2(K, L))
Used ordering: Polynomial Order [17,21] with Interpretation:

POL( IFREPL4(x1, ..., x4) ) = max{0, x4 - 2}


POL( cons2(x1, x2) ) = x2 + 3


POL( REPLACE3(x1, ..., x3) ) = max{0, x3 - 2}



The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ DependencyGraphProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

REPLACE3(N, M, cons2(K, L)) -> IFREPL4(eq2(N, K), N, M, cons2(K, L))

The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 0 SCCs with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

IFSELSORT2(true, cons2(N, L)) -> SELSORT1(L)
IFSELSORT2(false, cons2(N, L)) -> SELSORT1(replace3(min1(cons2(N, L)), N, L))
SELSORT1(cons2(N, L)) -> IFSELSORT2(eq2(N, min1(cons2(N, L))), cons2(N, L))

The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


IFSELSORT2(true, cons2(N, L)) -> SELSORT1(L)
IFSELSORT2(false, cons2(N, L)) -> SELSORT1(replace3(min1(cons2(N, L)), N, L))
The remaining pairs can at least be oriented weakly.

SELSORT1(cons2(N, L)) -> IFSELSORT2(eq2(N, min1(cons2(N, L))), cons2(N, L))
Used ordering: Polynomial Order [17,21] with Interpretation:

POL( IFSELSORT2(x1, x2) ) = max{0, x2 - 2}


POL( cons2(x1, x2) ) = x2 + 3


POL( SELSORT1(x1) ) = max{0, x1 - 2}


POL( replace3(x1, ..., x3) ) = x3


POL( ifrepl4(x1, ..., x4) ) = x4


POL( nil ) = 0



The following usable rules [14] were oriented:

replace3(N, M, nil) -> nil
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

SELSORT1(cons2(N, L)) -> IFSELSORT2(eq2(N, min1(cons2(N, L))), cons2(N, L))

The TRS R consists of the following rules:

eq2(0, 0) -> true
eq2(0, s1(Y)) -> false
eq2(s1(X), 0) -> false
eq2(s1(X), s1(Y)) -> eq2(X, Y)
le2(0, Y) -> true
le2(s1(X), 0) -> false
le2(s1(X), s1(Y)) -> le2(X, Y)
min1(cons2(0, nil)) -> 0
min1(cons2(s1(N), nil)) -> s1(N)
min1(cons2(N, cons2(M, L))) -> ifmin2(le2(N, M), cons2(N, cons2(M, L)))
ifmin2(true, cons2(N, cons2(M, L))) -> min1(cons2(N, L))
ifmin2(false, cons2(N, cons2(M, L))) -> min1(cons2(M, L))
replace3(N, M, nil) -> nil
replace3(N, M, cons2(K, L)) -> ifrepl4(eq2(N, K), N, M, cons2(K, L))
ifrepl4(true, N, M, cons2(K, L)) -> cons2(M, L)
ifrepl4(false, N, M, cons2(K, L)) -> cons2(K, replace3(N, M, L))
selsort1(nil) -> nil
selsort1(cons2(N, L)) -> ifselsort2(eq2(N, min1(cons2(N, L))), cons2(N, L))
ifselsort2(true, cons2(N, L)) -> cons2(N, selsort1(L))
ifselsort2(false, cons2(N, L)) -> cons2(min1(cons2(N, L)), selsort1(replace3(min1(cons2(N, L)), N, L)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 0 SCCs with 1 less node.